Skip to content

ci: Split Android build from rest#2145

Merged
gnprice merged 5 commits intozulip:mainfrom
gnprice:pr-ci-split
Feb 17, 2026
Merged

ci: Split Android build from rest#2145
gnprice merged 5 commits intozulip:mainfrom
gnprice:pr-ci-split

Conversation

@gnprice
Copy link
Copy Markdown
Member

@gnprice gnprice commented Feb 14, 2026

The Android build takes much longer than the whole rest of our CI. It'd be good to split them up as separate jobs, in particular so that we can get a result from the rest of our suites sooner.

(This PR is starting as a draft in order to experiment with how it behaves in CI.) OK, ready now.

@gnprice
Copy link
Copy Markdown
Member Author

gnprice commented Feb 14, 2026

Results from the timing added in that last commit (from this log):

analyze elapsed time: 0m34.9s
test elapsed time: 2m29.9s
flutter_version elapsed time: 0m0.0s
build_runner elapsed time: 0m49.8s
l10n elapsed time: 0m0.8s
drift elapsed time: 0m28.0s
pigeon elapsed time: 0m7.7s
icons elapsed time: 0m23.1s
shellcheck elapsed time: 0m2.6s

Total time for the tools/check step, as reported by GitHub: 4m57s.

So the test suite is just over half the total. (Which is very reasonable — it's running about 3500 test cases, across 93 test files by my count.) It might be productive to split the jobs up further still by putting test into its own job.

The main downside of splitting up the jobs more finely is the setup time for each job. In that same log, the setup steps take 1s + 1s + 1s + 17s + 28s + 8s (the longest being flutter precache), for a total of 56s.

@gnprice
Copy link
Copy Markdown
Member Author

gnprice commented Feb 14, 2026

Meanwhile the android suite, as logged here, takes much longer at 14m55s.

@gnprice gnprice marked this pull request as ready for review February 14, 2026 01:37
@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Feb 14, 2026
Copy link
Copy Markdown
Member

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gnprice. All LGTM, please merge at will.

# This logic relies on suite names having no spaces nor glob characters.
suites_str=" ${opt_suites[*]} "
for suite in "${opt_exclude[@]}"; do
suites_str="${suites_str/ "$suite" / }"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL, neat.

Comment on lines +30 to +32
android:
name: "Android build and lint"
runs-on: ubuntu-24.04
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. We may do something similar for iOS builds in CI, where the Actions job will run on macos image instead.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. That's #773 — probably a good idea to do that soon, given the work you're doing that adds more iOS code. I've moved it up to this milestone (was in the upcoming M9).

This gives us one fewer place to update each time we add
or rename a suite.
This will help us with splitting our CI into multiple jobs,
without having to list all the suites explicitly in the CI script.
The Android build takes much longer than the whole rest of our CI.
It'd therefore be good to split them up as separate jobs, in
particular so that we can get a result from the rest of our suites
sooner.
In particular this will help guide us in optimizing the way
our CI is arranged.
@gnprice gnprice merged commit 62c5065 into zulip:main Feb 17, 2026
2 checks passed
@gnprice
Copy link
Copy Markdown
Member Author

gnprice commented Feb 17, 2026

Thanks for the review! Merged.

@gnprice gnprice deleted the pr-ci-split branch February 17, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer review PR ready for review by Zulip maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants